package com.pig4cloud.pigx.contract.open.api.vo;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.pig4cloud.pigx.common.customize.utils.serializer.BigDecimalToPlainStringSerializer;
import com.pig4cloud.pigx.contract.annotation.SetScaleMainCurrency;
import com.pig4cloud.pigx.contract.annotation.SetScaleTokenCurrency;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 近期成交响应模型
 */
@Data
public class OpenApiLatelyTradeVOV1 implements Serializable {

	private static final long serialVersionUID = 1L;

	/**
	 * 成交价格
	 */
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	@SetScaleMainCurrency
	private BigDecimal price;

	/**
	 * 成交数量
	 */
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	@SetScaleTokenCurrency
	private BigDecimal num;

	/**
	 * 成交额
	 */
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	@SetScaleMainCurrency
	private BigDecimal tradeValue;

	/**
	 * 成交时间
	 */
	private Long time;

}
